package com.zksk.admin.domain.member.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.zksk.admin.api.domain.portal.vo.ConsultVo;
import com.zksk.mbg.admin.domain.MemberCredential;
import com.zksk.mbg.admin.domain.MemberManage;
import com.zksk.mbg.admin.domain.MemberOperator;
import com.zksk.mbg.admin.domain.MemberScore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
@Accessors(chain = true)
@ApiModel(value = "用户对象", description = "用户对象")
public class MemberVo implements Serializable
{

    @ApiModelProperty("主键id")
    @NotNull(message = "修改ID不能为空!", groups = Update.class)
    private Long memberId;

    @ApiModelProperty(value = "用户名称", required = true)
    @NotNull(message = "企业名称不能为空!", groups = Insert.class)
    private String memberName;

    @ApiModelProperty("用户编码")
    private String memberCode;

    @ApiModelProperty(value = "企业类型（国企、民营...）", required = true)
    @NotNull(message = "企业类型不能为空!", groups = Insert.class)
    private String memberType;

    @ApiModelProperty(value = "企业等级", required = true)
    @NotNull(message = "企业等级不能为空!", groups = Insert.class)
    private String memberLevel;

    @ApiModelProperty("营销人员，关联sys_user表user_id")
    private Long saleUser;

    @ApiModelProperty("营销人员名称，对应sys_user表nick_name")
    private String saleUsername;

    @ApiModelProperty("是否营销（0未营销 1已营销）")
    private Integer ifSale;

    @ApiModelProperty("营销分配时间")
    private LocalDateTime planTime;

    @ApiModelProperty("用户类型(0未申请用户、1已咨询用户、2已申请用户)")
    private Integer status;

    @ApiModelProperty(value = "统一社会信用代码", required = true)
    @NotNull(message = "统一社会信用代码不能为空!", groups = Insert.class)
    private String creditCode;

    @ApiModelProperty(value = "详细地址", required = true)
    @NotNull(message = "企业详细地址不能为空!", groups = Insert.class)
    private String address;

    @ApiModelProperty(value = "联系电话", required = true)
    @NotNull(message = "企业联系方式不能为空!", groups = Insert.class)
    private String phone;

    @ApiModelProperty(value = "注册资本", required = true)
    @NotNull(message = "注册资本不能为空!", groups = Insert.class)
    private BigDecimal regMoney;

    @ApiModelProperty(value = "行业类型（农林牧渔...）", required = true)
    @NotNull(message = "行业类型不能为空!", groups = Insert.class)
    private String tradeType;

    @ApiModelProperty(value = "法人姓名", required = true)
    @NotNull(message = "法人姓名不能为空!", groups = Insert.class)
    private String legalName;

    @ApiModelProperty(value = "法人联系电话", required = true)
    @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符")
    @NotNull(message = "法人联系电话不能为空!", groups = Insert.class)
    private String legalPhone;

    @ApiModelProperty(value = "基本户名称", required = true)
    @NotNull(message = "基本户名称不能为空!", groups = Insert.class)
    private String bankName;

    @ApiModelProperty(value = "开户行", required = true)
    @NotNull(message = "开户行不能为空!", groups = Insert.class)
    private String openBank;

    @ApiModelProperty(value = "基本户账号", required = true)
    @NotNull(message = "基本户账号不能为空!", groups = Insert.class)
    private String bankAccount;

    @ApiModelProperty(value = "开户许可文件", required = true)
    @NotNull(message = "开户许可文件不能为空!", groups = Insert.class)
    private String openBankFile;

    @ApiModelProperty(value = "营业执照", required = true)
    @NotNull(message = "营业执照不能为空!", groups = Insert.class)
    private String busCertificate;

    @ApiModelProperty(value = "法人身份证", required = true)
    @NotNull(message = "法人身份证不能为空!", groups = Insert.class)
    private String legalCode;

    @ApiModelProperty("用户来源所属平台ID")
    private Long stationsId;

    @ApiModelProperty("用户来源所属平台名称")
    private String stationsName;

    @ApiModelProperty("用户入库时间")
    private LocalDateTime storageTime;

    @ApiModelProperty("删除标识（0 正常 2 删除）")
    @TableLogic
    private Integer delFlag;

    //********************************************************************

    @ApiModelProperty("经办人姓名")
    private String operatorName;

    @ApiModelProperty("经办人联系电话")
    private String operatorPhone;

    @ApiModelProperty(value = "企业经办人信息",required = true)
    @NotNull(message = "企业经办人信息不能为空!", groups = Insert.class)
    private MemberOperator memberOperator;

    @ApiModelProperty("用户经营信息")
    private MemberManage memberManage;

    @ApiModelProperty("过往业绩集合")
    private List<MemberScore> memberScoreList;

    @ApiModelProperty("资质证书集合")
    private List<MemberCredential> memberCredentialList;

    @ApiModelProperty("产品咨询信息集合")
    private List<ConsultVo> consultVoList;


}
